package org.jcubic.mvc.context;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


public class ContextLoaderListener extends ContextLoader implements ServletContextListener {

    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("启动初始化");
        this.initWebApplicationContext(servletContextEvent.getServletContext());
    }

    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("关闭");
        this.closeWebApplicationContext(servletContextEvent.getServletContext());
    }
}
